/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.objects;

import com.hercules.android.receiver.model.commands.XRECommand;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>This class represents the command sequences which are ordered lists of commands that the host provides to the
 * receiver for execution at a later time. The host can choose to invoke the command sequence any number of times.
 * Command sequences are particularly useful for situations where the application wishes to respond to some user input
 * without making a round-trip to the server. Using command sequences can significantly improve an application's
 * responsiveness. It is a simple JavaBean (POJO) that provides getters and setters for all private attributes and
 * performs no argument validation in the setters.</p>
 *
 * <p><strong>Thread safety:</strong> This class is mutable and not thread safe.</p>
 *
 * @author saarixx, jmn
 * @version 1.0
 */
public class XRECommandSequence extends XREObject {

    /**
     * <p>The list of commands that the command sequence is to execute.</p>
     *
     * <p>Can be any value, can contain any values.</p>
     *
     * <p>Has getter and setter.</p>
     */
    private List<XRECommand> commands = new ArrayList<XRECommand>();

    /**
     * <p>Creates new instance of {@link XRECommandSequence} class.</p>
     */
    public XRECommandSequence() {
        // empty constructor
    }

    /**
     * <p>Retrieves the list of commands that the command sequence is to execute.</p>
     *
     * @return the list of commands that the command sequence is to execute
     */
    public List<XRECommand> getCommands() {
        return commands;
    }

    /**
     * <p>Sets the list of commands that the command sequence is to execute.</p>
     *
     * @param commands the list of commands that the command sequence is to execute
     */
    public void setCommands(List<XRECommand> commands) {
        this.commands = commands;
    }
}

